<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta charset="utf-8">
    <title>药品管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/AdminLTE.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pagination.css">
    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/js/pagination.js"></script>
    <script src="${pageContext.request.contextPath}/js/my.js"></script>
</head>

<body class="hold-transition skin-red sidebar-mini">
<!-- .box-body -->
<div class="box-header with-border">
    <h3 class="box-title">员工信息</h3>
</div>
<div class="box-body">
    <!-- 数据列表 -->
    <div class="table-box">
        <!-- 数据表格 -->
        <button type="button" data-toggle="modal" data-target="#borrowUser"> 增加 </button>
        <table id="dataList" class="table table-bordered table-striped table-hover dataTable text-center">
            <thead>
            <tr>
                <th class="sorting_asc">员工编号</th>
                <th class="sorting">员工姓名</th>
                <th class="sorting">性别</th>
                <th class="sorting">电话</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${view}" var="view">
                <tr>
                    <td>${view.uid}</td>
                    <td>${view.name}</td>
                    <td>${view.sex}</td>
                    <td>${view.phone}</td>
                    <td>
                        <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#borrowModal"
                                onclick="findById(${view.uid},'b')"> 修改 </button>
                        <button type="button" class="btn bg-olive btn-xs" onclick="deleteUserById(${view.uid})">删除</button>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <!--数据表格/-->
    </div>
</div>
<%--引用模拟窗口--%>
<jsp:include page="/admin/updateUser.jsp"></jsp:include>
<jsp:include page="/admin/addUser.jsp"></jsp:include>
</body>
</html>